package com.yanqu.road.logic.bussiness.match;

import com.yanqu.road.entity.config.match.MatchInfo;
import com.yanqu.road.entity.config.match.MatchReward;
import com.yanqu.road.entity.match.*;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.List;
import java.util.Map;

/**
 * @author ：zfr
 * @date ：2021/2/5 17:51
 * 杂艺
 */
public class MatchBussiness {

    public static Map<Integer, List<MatchInfo>> getMatchListMap() {
        return DaoHelper.getMatchConfigDaoImpl().getMatchListMap();
    }

    public static Map<Integer, List<MatchReward>> getMatchRewardsMap() {
        return DaoHelper.getMatchConfigDaoImpl().getMatchRewardsMap();
    }

    public static Map<Integer, MatchPatronsData> getMatchPatronsDataMap(long userId) {
        return DaoHelper.getMatchPatronsDataDaoImpl().getMatchPatronsDataMap(userId);
    }

    public static boolean addData(MatchPatronsData matchPatronsData) {
        return DaoHelper.getMatchPatronsDataDaoImpl().add(matchPatronsData);
    }

    public static boolean updateData(MatchPatronsData matchPatronsData) {
        return DaoHelper.getMatchPatronsDataDaoImpl().update(matchPatronsData);
    }

    public static Map<Integer, Map<Integer, MatchTimeData>> getMatchTimeData(long userId) {
        return DaoHelper.getMatchTimeDataDaoImpl().getMatchTimeData(userId);
    }

    public static boolean addData(MatchTimeData data) {
        return DaoHelper.getMatchTimeDataDaoImpl().add(data);
    }

    public static boolean updateData(MatchTimeData data) {
        return DaoHelper.getMatchTimeDataDaoImpl().update(data);
    }


    public static List<MatchData> getMatchDataList(int timeId) {
        return DaoHelper.getMatchDataDaoImpl().getMatchDataList(timeId);
    }

    public static boolean addData(MatchData data) {
        return DaoHelper.getMatchDataDaoImpl().add(data);
    }

    public static boolean updateData(MatchData data) {
        return DaoHelper.getMatchDataDaoImpl().update(data);
    }

    public static Map<Long, Map<Integer, Map<Integer, List<UserMatchData>>>> getUserDataList(int timeId) {
        return DaoHelper.getMatchUserDataDaoImpl().getUserDataList(timeId);
    }

    public static boolean addData(UserMatchData data) {
        return DaoHelper.getMatchUserDataDaoImpl().add(data);
    }

    public static boolean updateData(UserMatchData data) {
        return DaoHelper.getMatchUserDataDaoImpl().update(data);
    }

    public static int getMatchMaxId() {
        return DaoHelper.getMatchDataDaoImpl().getMatchMaxId();
    }

    public static Map<Integer, MatchWeekRankRewardState> getMatchWeekRankRewardStateMap(long userId) {
        return DaoHelper.getMatchWeekRankRewardDaoImpl().getMatchWeekRankRewardStateMap(userId);
    }

    public static boolean addMatchWeekRankRewardState(MatchWeekRankRewardState data) {
        return DaoHelper.getMatchWeekRankRewardDaoImpl().add(data);
    }

    public static boolean upMatchWeekRankRewardState(MatchWeekRankRewardState data) {
        return DaoHelper.getMatchWeekRankRewardDaoImpl().update(data);
    }

    public static Map<Integer, Map<Long, Map<Long, RankRemoveData>>> getRankRemoveDataMap(int weekId) {
        return DaoHelper.getRankRemoveDataDaoImpl().getRankRemoveDataMap(weekId);
    }

    public static boolean addRankRemoveData(RankRemoveData data) {
        return DaoHelper.getRankRemoveDataDaoImpl().add(data);
    }

    public static boolean updateRankRemoveData(RankRemoveData data) {
        return DaoHelper.getRankRemoveDataDaoImpl().update(data);
    }
}
